package com.future.common.api.feign;

import com.future.common.api.auth.UserInfo;
import com.future.common.api.result.R;
import com.future.common.api.content.SecurityConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName : RemoteUserService
 * @Author : lby
 * @Date: 2021/1/26 17:24
 * @Description : 远程调用user
 */
@FeignClient(contextId = "remoteUserService", value = "future-admin")
public interface RemoteUserService {


    @GetMapping("/sys-user/info/{username}")
    R<UserInfo> getLoginUser(@PathVariable("username") String userName, @RequestHeader(SecurityConstant.FROM) String from);


    @GetMapping("/test-feign")
    R testFeign();
}